home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Software Contest 3 / FM Towns Software Contest 3.iso / exp / video_t / no1 / c_sorse / cdplay.c < prev    next >
C/C++ Source or Header  |  1994-01-07  |  11KB  |  464 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    Dialog_cdplay ;
  9. extern int    Message_cd3 ;
  10. extern int    Message_cd2 ;
  11. extern int    Message_cd1 ;
  12. extern int    TIcon_cd1 ;
  13. extern int    cd_bottan() ;
  14. extern int    TIcon_cd2 ;
  15. extern int    _001Message_cd2 ;
  16. extern int    _002Message_cd2 ;
  17. extern int    _003Message_cd2 ;
  18. extern int    _004Message_cd2 ;
  19. extern int    _005Message_cd2 ;
  20. extern int    _006Message_cd2 ;
  21. extern int    NumBox_cd1 ;
  22. extern int    _001NumBox_00a7 ;
  23. extern int    _002NumBox_00a7 ;
  24. extern int    DButton_cd0 ;
  25. extern int    cd_stop() ;
  26. extern int    Button_cd1 ;
  27. extern int    cd_on() ;
  28. extern int    DButton_cd2 ;
  29. extern int    cd_kaku() ;
  30. extern int    DButton_cd3 ;
  31. extern int    cd_off() ;
  32. extern int    _007Message_cd2 ;
  33. extern int    _008Message_cd2 ;
  34. extern int    _009Message_cd2 ;
  35. extern int    _010Message_cd2 ;
  36. extern int    Message_cd10 ;
  37. extern int    _001Message_cd10 ;
  38.  
  39. #define ALIGN    4
  40. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  41.  
  42. /*    MMI_init 用データ    */
  43.  
  44. /*    ヘッダ    */
  45.  
  46. MMIINIT    initDataCDPLAY = { "MmiInit",  25, 0 } ;
  47.  
  48. /* Dialog_cdplay */
  49.  
  50. static MMIPACKET d001 = {    &Dialog_cdplay,
  51.                             NULL,
  52.                             &MJ_DIALOGL40,
  53.                             OFFSET(DIALOGL40),
  54.                             0
  55.                         } ;
  56. static DIALOGL40    d001d = {    MS_BTLEFTL40 | MS_EVMOSONL40,
  57.                               21,  24, 348, 313, 0, 7, 0,
  58.                             MS_SRECTL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  59.                             NULL,   0,   0
  60.                         } ;
  61.  
  62. /* Message_cd3 */
  63.  
  64. static MMIPACKET d002 = {    &Message_cd3,
  65.                             &Dialog_cdplay,
  66.                             &MJ_MSGL40,
  67.                             OFFSET(MSGL40),
  68.                             0
  69.                         } ;
  70. static MSGL40    d002d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  71.                               26,  33, 319,  56, 0,15,12,
  72.                             MS_NONEL40,
  73.                             "CD演奏",
  74.                                2,  16,  16,
  75.                             MS_NONEL40,
  76.                               20,   0
  77.                         } ;
  78.  
  79. /* Message_cd2 */
  80.  
  81. static MMIPACKET d003 = {    &Message_cd2,
  82.                             &Dialog_cdplay,
  83.                             &MJ_MSGL40,
  84.                             OFFSET(MSGL40),
  85.                             0
  86.                         } ;
  87. static MSGL40    d003d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  88.                               70,  63, 148,  86, 0,15, 0,
  89.                             MS_NONEL40,
  90.                             "全曲演奏",
  91.                                2,  16,  16,
  92.                             MS_NONEL40,
  93.                                0,   0
  94.                         } ;
  95.  
  96. /* Message_cd1 */
  97.  
  98. static MMIPACKET d004 = {    &Message_cd1,
  99.                             &Dialog_cdplay,
  100.                             &MJ_MSGL40,
  101.                             OFFSET(MSGL40),
  102.                             0
  103.                         } ;
  104. static MSGL40    d004d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  105.                              202,  63, 319,  86, 0,15, 0,
  106.                             MS_NONEL40,
  107.                             "一曲のみ演奏",
  108.                                2,  16,  16,
  109.                             MS_NONEL40,
  110.                                0,   0
  111.                         } ;
  112.  
  113. /* TIcon_cd1 */
  114.  
  115. static MMIPACKET d005 = {    &TIcon_cd1,
  116.                             &Dialog_cdplay,
  117.                             &MJ_TICONL40,
  118.                             OFFSET(TICONL40),
  119.                             0
  120.                         } ;
  121. static TICONL40    d005d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40 | MS_LEFTL40,
  122.                               42,  64,  59,  83, 0, 7, 0,
  123.                             MS_UFRAMEL40 | MS_FRAMEL40,
  124.                             cd_bottan,
  125.                             0x0000, 259, 260
  126.                         } ;
  127.  
  128. /* TIcon_cd2 */
  129.  
  130. static MMIPACKET d006 = {    &TIcon_cd2,
  131.                             &Dialog_cdplay,
  132.                             &MJ_TICONL40,
  133.                             OFFSET(TICONL40),
  134.                             0
  135.                         } ;
  136. static TICONL40    d006d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40 | MS_LEFTL40,
  137.                              186,  64, 203,  83, 0, 7, 0,
  138.                             MS_UFRAMEL40 | MS_FRAMEL40,
  139.                             cd_bottan,
  140.                             0x0000, 259, 260
  141.                         } ;
  142.  
  143. /* _001Message_cd2 */
  144.  
  145. static MMIPACKET d007 = {    &_001Message_cd2,
  146.                             &Dialog_cdplay,
  147.                             &MJ_MSGL40,
  148.                             OFFSET(MSGL40),
  149.                             0
  150.                         } ;
  151. static MSGL40    d007d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  152.                               67, 128, 211, 151, 0,15, 0,
  153.                             MS_NONEL40,
  154.                             "演奏トラック",
  155.                                2,  16,  16,
  156.                             MS_NONEL40,
  157.                                8,   0
  158.                         } ;
  159.  
  160. /* _002Message_cd2 */
  161.  
  162. static MMIPACKET d008 = {    &_002Message_cd2,
  163.                             &Dialog_cdplay,
  164.                             &MJ_MSGL40,
  165.                             OFFSET(MSGL40),
  166.                             0
  167.                         } ;
  168. static MSGL40    d008d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  169.                               67, 164, 209, 187, 0,15, 0,
  170.                             MS_NONEL40,
  171.                             "演奏開始オフセット",
  172.                                2,  16,  16,
  173.                             MS_NONEL40,
  174.                                0,   0
  175.                         } ;
  176.  
  177. /* _003Message_cd2 */
  178.  
  179. static MMIPACKET d009 = {    &_003Message_cd2,
  180.                             &Dialog_cdplay,
  181.                             &MJ_MSGL40,
  182.                             OFFSET(MSGL40),
  183.                             0
  184.                         } ;
  185. static MSGL40    d009d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  186.                              268, 128, 308, 151, 0,15, 0,
  187.                             MS_NONEL40,
  188.                             "曲目",
  189.                                2,  16,  16,
  190.                             MS_NONEL40,
  191.                                1,   0
  192.                         } ;
  193.  
  194. /* _004Message_cd2 */
  195.  
  196. static MMIPACKET d010 = {    &_004Message_cd2,
  197.                             &Dialog_cdplay,
  198.                             &MJ_MSGL40,
  199.                             OFFSET(MSGL40),
  200.                             0
  201.                         } ;
  202. static MSGL40    d010d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  203.                              273, 165, 313, 188, 0,15, 0,
  204.                             MS_NONEL40,
  205.                             "分",
  206.                                2,  16,  16,
  207.                             MS_NONEL40,
  208.                                1,   0
  209.                         } ;
  210.  
  211. /* _005Message_cd2 */
  212.  
  213. static MMIPACKET d011 = {    &_005Message_cd2,
  214.                             &Dialog_cdplay,
  215.                             &MJ_MSGL40,
  216.                             OFFSET(MSGL40),
  217.                             0
  218.                         } ;
  219. static MSGL40    d011d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  220.                               68, 202, 210, 225, 0,15, 0,
  221.                             MS_NONEL40,
  222.                             "演奏開始オフセット",
  223.                                2,  16,  16,
  224.                             MS_NONEL40,
  225.                                0,   0
  226.                         } ;
  227.  
  228. /* _006Message_cd2 */
  229.  
  230. static MMIPACKET d012 = {    &_006Message_cd2,
  231.                             &Dialog_cdplay,
  232.                             &MJ_MSGL40,
  233.                             OFFSET(MSGL40),
  234.                             0
  235.                         } ;
  236. static MSGL40    d012d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  237.                              271, 202, 311, 225, 0,15, 0,
  238.                             MS_NONEL40,
  239.                             "秒",
  240.                                2,  16,  16,
  241.                             MS_NONEL40,
  242.                                1,   0
  243.                         } ;
  244.  
  245. /* NumBox_cd1 */
  246.  
  247. static MMIPACKET d013 = {    &NumBox_cd1,
  248.                             &Dialog_cdplay,
  249.                             &MJ_NUMBOXL40,
  250.                             OFFSET(NUMBOXL40),
  251.                             0
  252.                         } ;
  253. static NUMBOXL40    d013d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  254.                              214, 127, 267, 150, 0, 7, 0,
  255.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  256.                             0,
  257.                                1,  12,  12,
  258.                             MS_NONEL40,
  259.                                0,   0,
  260.                                0,   0,  99,   1,   0,
  261.                              263, 264
  262.                         } ;
  263.  
  264. /* _001NumBox_00a7 */
  265.  
  266. static MMIPACKET d014 = {    &_001NumBox_00a7,
  267.                             &Dialog_cdplay,
  268.                             &MJ_NUMBOXL40,
  269.                             OFFSET(NUMBOXL40),
  270.                             0
  271.                         } ;
  272. static NUMBOXL40    d014d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  273.                              214, 164, 267, 187, 0, 7, 0,
  274.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  275.                             0,
  276.                                1,  12,  12,
  277.                             MS_NONEL40,
  278.                                0,   0,
  279.                                0,   0, 120,   1,   0,
  280.                              263, 264
  281.                         } ;
  282.  
  283. /* _002NumBox_00a7 */
  284.  
  285. static MMIPACKET d015 = {    &_002NumBox_00a7,
  286.                             &Dialog_cdplay,
  287.                             &MJ_NUMBOXL40,
  288.                             OFFSET(NUMBOXL40),
  289.                             0
  290.                         } ;
  291. static NUMBOXL40    d015d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  292.                              214, 201, 267, 224, 0, 7, 0,
  293.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  294.                             0,
  295.                                1,  12,  12,
  296.                             MS_NONEL40,
  297.                                0,   0,
  298.                                0,   0,  59,   1,   0,
  299.                              263, 264
  300.                         } ;
  301.  
  302. /* DButton_cd0 */
  303.  
  304. static MMIPACKET d016 = {    &DButton_cd0,
  305.                             &Dialog_cdplay,
  306.                             &MJ_DBUTTONL40,
  307.                             OFFSET(DBUTTONL40),
  308.                             0
  309.                         } ;
  310. static DBUTTONL40    d016d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  311.                              130, 237, 238, 262, 0, 7, 0,
  312.                             MS_UFRAMEL40 | MS_FRAMEL40,
  313.                             cd_stop,
  314.                             0x0000
  315.                         } ;
  316.  
  317. /* Button_cd1 */
  318.  
  319. static MMIPACKET d017 = {    &Button_cd1,
  320.                             &Dialog_cdplay,
  321.                             &MJ_DBUTTONL40,
  322.                             OFFSET(DBUTTONL40),
  323.                             0
  324.                         } ;
  325. static DBUTTONL40    d017d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  326.                               43, 272, 119, 297, 0, 7, 0,
  327.                             MS_UFRAMEL40 | MS_FRAMEL40 | MS_DEFAULTL40,
  328.                             cd_on,
  329.                             0x0000
  330.                         } ;
  331.  
  332. /* DButton_cd2 */
  333.  
  334. static MMIPACKET d018 = {    &DButton_cd2,
  335.                             &Dialog_cdplay,
  336.                             &MJ_DBUTTONL40,
  337.                             OFFSET(DBUTTONL40),
  338.                             0
  339.                         } ;
  340. static DBUTTONL40    d018d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  341.                              147, 271, 223, 296, 0, 7, 0,
  342.                             MS_UFRAMEL40 | MS_FRAMEL40,
  343.                             cd_kaku,
  344.                             0x0000
  345.                         } ;
  346.  
  347. /* DButton_cd3 */
  348.  
  349. static MMIPACKET d019 = {    &DButton_cd3,
  350.                             &Dialog_cdplay,
  351.                             &MJ_DBUTTONL40,
  352.                             OFFSET(DBUTTONL40),
  353.                             0
  354.                         } ;
  355. static DBUTTONL40    d019d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  356.                              248, 271, 324, 296, 0, 7, 0,
  357.                             MS_UFRAMEL40 | MS_FRAMEL40,
  358.                             cd_off,
  359.                             0x0000
  360.                         } ;
  361.  
  362. /* _007Message_cd2 */
  363.  
  364. static MMIPACKET d020 = {    &_007Message_cd2,
  365.                             &Dialog_cdplay,
  366.                             &MJ_MSGL40,
  367.                             OFFSET(MSGL40),
  368.                             0
  369.                         } ;
  370. static MSGL40    d020d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  371.                               43, 273, 118, 296, 0,15,15,
  372.                             MS_NONEL40,
  373.                             "確定",
  374.                                2,  16,  16,
  375.                             MS_NONEL40,
  376.                               16,   0
  377.                         } ;
  378.  
  379. /* _008Message_cd2 */
  380.  
  381. static MMIPACKET d021 = {    &_008Message_cd2,
  382.                             &Dialog_cdplay,
  383.                             &MJ_MSGL40,
  384.                             OFFSET(MSGL40),
  385.                             0
  386.                         } ;
  387. static MSGL40    d021d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  388.                              149, 272, 224, 295, 0,15,15,
  389.                             MS_NONEL40,
  390.                             "演奏確認",
  391.                                2,  16,  16,
  392.                             MS_NONEL40,
  393.                                0,   0
  394.                         } ;
  395.  
  396. /* _009Message_cd2 */
  397.  
  398. static MMIPACKET d022 = {    &_009Message_cd2,
  399.                             &Dialog_cdplay,
  400.                             &MJ_MSGL40,
  401.                             OFFSET(MSGL40),
  402.                             0
  403.                         } ;
  404. static MSGL40    d022d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  405.                              250, 272, 325, 295, 0,15,15,
  406.                             MS_NONEL40,
  407.                             "取消",
  408.                                2,  16,  16,
  409.                             MS_NONEL40,
  410.                               16,   0
  411.                         } ;
  412.  
  413. /* _010Message_cd2 */
  414.  
  415. static MMIPACKET d023 = {    &_010Message_cd2,
  416.                             &Dialog_cdplay,
  417.                             &MJ_MSGL40,
  418.                             OFFSET(MSGL40),
  419.                             0
  420.                         } ;
  421. static MSGL40    d023d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  422.                              131, 238, 237, 261, 0,15,15,
  423.                             MS_NONEL40,
  424.                             "演奏停止",
  425.                                2,  16,  16,
  426.                             MS_NONEL40,
  427.                                8,   0
  428.                         } ;
  429.  
  430. /* Message_cd10 */
  431.  
  432. static MMIPACKET d024 = {    &Message_cd10,
  433.                             &Dialog_cdplay,
  434.                             &MJ_MSGL40,
  435.                             OFFSET(MSGL40),
  436.                             0
  437.                         } ;
  438. static MSGL40    d024d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  439.                               26,  93, 239, 116, 0,15,14,
  440.                             MS_NONEL40,
  441.                             "演奏トラックを 0 にすると演奏停止",
  442.                                1,  12,  12,
  443.                             MS_NONEL40,
  444.                                0,   0
  445.                         } ;
  446.  
  447. /* _001Message_cd10 */
  448.  
  449. static MMIPACKET d025 = {    &_001Message_cd10,
  450.                             &Dialog_cdplay,
  451.                             &MJ_MSGL40,
  452.                             OFFSET(MSGL40),
  453.                             0
  454.                         } ;
  455. static MSGL40    d025d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  456.                              231,  93, 342, 116, 0,15,14,
  457.                             MS_NONEL40,
  458.                             "コマンドになります",
  459.                                1,  12,  12,
  460.                             MS_NONEL40,
  461.                                0,   0
  462.                         } ;
  463.  
  464.